package com.example.dellpc.myapplication;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

/**
 * Created by dellpc on 2016/8/10.
 */
public class DrawLayout extends Activity {
    private ListView listView;
    private ArrayAdapter<String> adapter;

    private String [] datas=new String[]{"title1","title2","title3","title4","title5","title6","title7","title8"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.drawlayout);
        init();
    }

    public void init() {

        listView= (ListView) findViewById(R.id.listview);
        adapter=new ArrayAdapter<String>(this,R.layout.support_simple_spinner_dropdown_item,datas);
        listView.setAdapter(adapter);




    }
}
